// import com.alibaba.druid.sql.ast.SQLExpr;
// import com.alibaba.druid.sql.ast.SQLName;
// import com.alibaba.druid.sql.ast.statement.SQLCreateStatement;
// import com.alibaba.druid.sql.dialect.mysql.visitor.MySqlASTVisitor;

#include "MySqlCreateServerStatement.h"
#include "../../../../ast/SQLExpr.h"
#include "../../../../ast/SQLName.h"
#include "../../visitor/MySqlASTVisitor.h"

SQLName_ptr MySqlCreateServerStatement::getName()
{
  return name;
}

void MySqlCreateServerStatement::setName(SQLName_ptr x)
{
  if (x != nullptr)
  {
    x->setParent(SharedObject(MySqlCreateServerStatement));
  }
  this->name = x;
}

SQLName_ptr MySqlCreateServerStatement::getForeignDataWrapper()
{
  return foreignDataWrapper;
}

void MySqlCreateServerStatement::setForeignDataWrapper(SQLName_ptr x)
{
  if (x != nullptr)
  {
    x->setParent(SharedObject(MySqlCreateServerStatement));
  }
  this->foreignDataWrapper = x;
}

SQLExpr_ptr MySqlCreateServerStatement::getHost()
{
  return host;
}

void MySqlCreateServerStatement::setHost(SQLExpr_ptr x)
{
  if (x != nullptr)
  {
    x->setParent(SharedObject(MySqlCreateServerStatement));
  }
  this->host = x;
}

SQLExpr_ptr MySqlCreateServerStatement::getDatabase()
{
  return database;
}

void MySqlCreateServerStatement::setDatabase(SQLExpr_ptr x)
{
  if (x != nullptr)
  {
    x->setParent(SharedObject(MySqlCreateServerStatement));
  }
  this->database = x;
}

SQLExpr_ptr MySqlCreateServerStatement::getUser()
{
  return user;
}

void MySqlCreateServerStatement::setUser(SQLExpr_ptr x)
{
  if (x != nullptr)
  {
    x->setParent(SharedObject(MySqlCreateServerStatement));
  }
  this->user = x;
}

SQLExpr_ptr MySqlCreateServerStatement::getPassword()
{
  return password;
}

void MySqlCreateServerStatement::setPassword(SQLExpr_ptr x)
{
  if (x != nullptr)
  {
    x->setParent(SharedObject(MySqlCreateServerStatement));
  }
  this->password = x;
}

SQLExpr_ptr MySqlCreateServerStatement::getSocket()
{
  return socket;
}

void MySqlCreateServerStatement::setSocket(SQLExpr_ptr x)
{
  if (x != nullptr)
  {
    x->setParent(SharedObject(MySqlCreateServerStatement));
  }
  this->socket = x;
}

SQLExpr_ptr MySqlCreateServerStatement::getOwner()
{
  return owner;
}

void MySqlCreateServerStatement::setOwner(SQLExpr_ptr x)
{
  if (x != nullptr)
  {
    x->setParent(SharedObject(MySqlCreateServerStatement));
  }
  this->owner = x;
}

SQLExpr_ptr MySqlCreateServerStatement::getPort()
{
  return port;
}

void MySqlCreateServerStatement::setPort(SQLExpr_ptr x)
{
  if (x != nullptr)
  {
    x->setParent(SharedObject(MySqlCreateServerStatement));
  }
  this->port = x;
}

void MySqlCreateServerStatement::accept0(MySqlASTVisitor_ptr visitor)
{
  if (visitor->visit(SharedObject(MySqlCreateServerStatement)))
  {
    acceptChild(visitor, name);
    acceptChild(visitor, foreignDataWrapper);
    acceptChild(visitor, host);
    acceptChild(visitor, database);
    acceptChild(visitor, user);
    acceptChild(visitor, password);
    acceptChild(visitor, socket);
    acceptChild(visitor, owner);
    acceptChild(visitor, port);
  }
  visitor->endVisit(SharedObject(MySqlCreateServerStatement));
}
